<template>
  <view class="position-relat pulse-wrapper flex-row-center">
    <view class="position-relat pulse-item one" :style="{ background: bgColor }"></view>
    <view class="position-relat pulse-item two" :style="{ background: bgColor }"></view>
    <view class="position-relat pulse-item three" :style="{ background: bgColor }"></view>
  </view>
</template>
<script>
export default {
  props: {
    bgColor: {
      type: String,
      default: 'rgba(135, 206, 235, 1)',
    },
  },
};
</script>
<style lang="scss" scoped>
.pulse-wrapper {
  width: 100%;
  height: 70rpx;
}
.pulse-item {
  width: 20rpx;
  height: 20rpx;
  border-radius: 50%;
  background-color: skyBlue;
  animation: pulse-loader 0.4s ease 0s infinite alternate;
  position: relative;
  display: inline-block;
}
.two {
  margin: 0 16rpx;
  animation: pulse-loader 0.4s ease 0.2s infinite alternate;
}
.three {
  animation: pulse-loader 0.4s ease 0.4s infinite alternate;
}

@keyframes pulse-loader {
  0% {
    opacity: 1;
    transform: scale(1);
  }
  100% {
    opacity: 0.5;
    transform: scale(0.75);
  }
}
</style>
